
import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The test class TestPassager.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class TestPassager
{
   private Passager passager1;
   private Autobus autobus1; 
   
    /**
     * Default constructor for test class TestPassager
     */
    public TestPassager()
    {
       
    }
    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
       passager1 = new Passager();
        
       autobus1 = new Autobus(20 , 0, 30, 30);
    }

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }
    
    @Test
    public void testInitEtatDebout(){
        Passager pascal = new Passager(); 
        assertTrue(pascal.getEtatDebout());
        assertFalse(pascal.getEtatAssis());
    }
    
    @Test
    public void testChangementEnAssis(){
        Passager pascal = new Passager();
        pascal.changerEtatEnAssis();
        assertFalse(pascal.getEtatDebout());
        assertTrue(pascal.getEtatAssis());
    }
 

    @Test
    public void TestPassager1()
    {
        Passager passager1 = new Passager();
        assertEquals(false, passager1.getEtatAssis());
        passager1.changerEtatEnAssis();
        assertEquals(true, passager1.getEtatAssis());
    }

   

  

    @Test
    public void TestPassager()
    {
        assertEquals(false, passager1.getEtatAssis());
        assertEquals(true, passager1.getEtatDebout());
        assertEquals(true, autobus1.ChangerEnAssis(passager1));
        assertEquals(true, passager1.getEtatAssis());
        assertEquals(false, passager1.getEtatDebout());
    }
}





